package com.jichangxiu.server.platform.entity.map;

import com.jichangxiu.server.platform.entity.dto.PlatformLogQueryDto;
import com.jichangxiu.server.platform.entity.po.PlatformLog;
import com.jichangxiu.server.platform.entity.vo.PlatformLogQueryVo;
import org.mapstruct.Builder;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * PlatformLogBasic:
 *
 * @author Jcx
 * @create 2023-03-08 21:17
 */
@Mapper(builder = @Builder(disableBuilder = true))
public interface PlatformLogBasic {

    public PlatformLogBasic INSTANCE = Mappers.getMapper(PlatformLogBasic.class);

    /**
     * 转换 PlatformLog
     *
     * @param platformLogQueryVo 视图对象
     * @return 数据库对象
     */
    public PlatformLog toPlatformLog(PlatformLogQueryVo platformLogQueryVo);

    /**
     * 转换 PlatformLogQueryDto
     *
     * @param platformLog 数据库对象
     * @return 传输对象
     */
    public PlatformLogQueryDto toPlatformLogQueryDto(PlatformLog platformLog);

    /**
     * 转换 PlatformLogQueryDto 列表
     *
     * @param platformLogList 数据库对象列表
     * @return 传输对象列表
     */
    public List<PlatformLogQueryDto> toPlatformLogQueryDtoList(List<PlatformLog> platformLogList);

}
